home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / t3_1 / sources.lha / sources / comp / primops / m682arith.t < prev    next >
Encoding:
Text File  |  1988-02-05  |  2.5 KB  |  57 lines

  1. (herald m682arith
  2.         (env (make-empty-support-env 'nil) primops))
  3.  
  4. ;;; Copyright (c) 1985 Yale University
  5. ;;;     Authors: N Adams, R Kelsey, D Kranz, J Philbin, J Rees.
  6. ;;; This material was developed by the T Project at the Yale University Computer 
  7. ;;; Science Department.  Permission to copy this software, to redistribute it, 
  8. ;;; and to use it for any purpose is granted, subject to the following restric-
  9. ;;; tions and understandings.
  10. ;;; 1. Any copy made of this software must include this copyright notice in full.
  11. ;;; 2. Users of this software agree to make their best efforts (a) to return
  12. ;;;    to the T Project at Yale any improvements or extensions that they make,
  13. ;;;    so that these may be included in future releases; and (b) to inform
  14. ;;;    the T Project of noteworthy uses of this software.
  15. ;;; 3. All materials developed as a consequence of the use of this software
  16. ;;;    shall duly acknowledge such use, in accordance with the usual standards
  17. ;;;    of acknowledging credit in academic research.
  18. ;;; 4. Yale has made no warrantee or representation that the operation of
  19. ;;;    this software will be error-free, and Yale is under no obligation to
  20. ;;;    provide any services, by way of maintenance, update, or otherwise.
  21. ;;; 5. In conjunction with products arising from the use of this material,
  22. ;;;    there shall be no use of the name of the Yale University nor of any
  23. ;;;    adaptation thereof in any advertising, promotional, or sales literature
  24. ;;;    without prior written consent from Yale in each case.
  25. ;;;
  26.  
  27. ;;; Copyright (c) 1985 David Kranz
  28.  
  29.  
  30. ;;; ARITHMETIC
  31. ;;;===========================================================================
  32.  
  33. (define-constant fixnum-multiply
  34.   (primop fixnum-multiply ()
  35.     ((primop.generate self node)
  36.      (generate-fixnum-mdr node 'multiply))
  37.     ((primop.rep-wants self) '(rep/integer rep/integer))
  38.     ((primop.type self node) '(proc (cont fixnum?) fixnum? fixnum?))))
  39.  
  40. (define-constant fixnum-divide
  41.   (primop fixnum-divide ()
  42.     ((primop.generate self node)
  43.      (generate-fixnum-mdr node 'quotient))
  44.     ((primop.rep-wants self) '(rep/integer rep/integer))
  45.    ((primop.type self node) '(proc (cont fixnum?) fixnum? fixnum?))))
  46.  
  47. (define-constant fixnum-remainder
  48.   (primop fixnum-remainder ()
  49.     ((primop.generate self node)
  50.      (generate-fixnum-mdr node 'remainder))
  51.     ((primop.rep-wants self) '(rep/integer rep/integer))
  52.    ((primop.type self node) '(proc (cont fixnum?) fixnum? fixnum?))))
  53.  
  54.  
  55.                                 
  56.  
  57.